//
//  UserDetailTableViewCell.m
//  小汽车
//
//  Created by mill on 15/1/10.
//  Copyright (c) 2015年 蓝欧科技. All rights reserved.
//

#import "UserDetailTableViewCell.h"

@implementation UserDetailTableViewCell

- (void)dealloc
{
    [_leftLabel release];
    [_attribute release];
    [_rightImage release];
    [super dealloc];
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.leftLabel = [[UILabel alloc] init];
        _leftLabel.textAlignment = NSTextAlignmentCenter;
        _leftLabel.font = [UIFont systemFontOfSize:15];
        [self.contentView addSubview:_leftLabel];
        [_leftLabel release];
        
        self.attribute = [[UILabel alloc] init];
        _attribute.font = [UIFont systemFontOfSize:15];
        [self.contentView addSubview:_attribute];
        [_attribute release];
        
        UIImage *image = [UIImage imageNamed:@"user.png"];
        self.rightImage = [[UIImageView alloc] init];
        _rightImage.image = image;
        [self.contentView addSubview:_rightImage];
        [_rightImage release];
        
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    _leftLabel.frame = CGRectMake(self.frame.size.width / 20, 0, self.contentView.frame.size.width / 4, self.contentView.frame.size.height);
    
    _attribute.frame = CGRectMake(self.leftLabel.frame.size.width + 30, 0, self.contentView.frame.size.width / 5 * 2, self.contentView.frame.size.height);
    
    _rightImage.frame = CGRectMake(self.frame.size.width / 9 * 8, self.frame.size.height / 6, self.frame.size.height/ 3 * 2, self.frame.size.height / 3 * 2);
    
    
}

- (void)awakeFromNib {
    // Initialization code
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    
    // Configure the view for the selected state
}

@end
